From: Florian Müllner Date: Wed, 27 Jul 2022 10:54:24 +0000 (+0200) Subject: status/remoteAccess: Move to quick settings X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~183 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0f1f5bb174068949a59709cfb443eafc7bfe266f;p=gnome-shell.git status/remoteAccess: Move to quick settings And there goes the last icon-only indicator. From now on, some actual work will be involved 😱️ Part-of: --- diff --git a/js/ui/panel.js b/js/ui/panel.js index c32393cff..e487f4518 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -383,7 +383,6 @@ class AggregateMenu extends PanelMenu.Button { else this._bluetooth = null; - this._remoteAccess = new imports.ui.status.remoteAccess.RemoteAccessApplet(); this._power = new imports.ui.status.power.Indicator(); this._powerProfiles = new imports.ui.status.powerProfiles.Indicator(); this._rfkill = new imports.ui.status.rfkill.Indicator(); @@ -392,7 +391,6 @@ class AggregateMenu extends PanelMenu.Button { this._system = new imports.ui.status.system.Indicator(); this._nightLight = new imports.ui.status.nightLight.Indicator(); - this._indicators.add_child(this._remoteAccess); this._indicators.add_child(this._nightLight); if (this._network) this._indicators.add_child(this._network); @@ -412,7 +410,6 @@ class AggregateMenu extends PanelMenu.Button { if (this._bluetooth) this.menu.addMenuItem(this._bluetooth.menu); - this.menu.addMenuItem(this._remoteAccess.menu); this.menu.addMenuItem(this._rfkill.menu); this.menu.addMenuItem(this._power.menu); this.menu.addMenuItem(this._powerProfiles.menu); @@ -439,14 +436,17 @@ class QuickSettings extends PanelMenu.Button { this.setMenu(new QuickSettingsMenu(this, N_QUICK_SETTINGS_COLUMNS)); + this._remoteAccess = new imports.ui.status.remoteAccess.RemoteAccessApplet(); this._location = new imports.ui.status.location.Indicator(); this._thunderbolt = new imports.ui.status.thunderbolt.Indicator(); this._unsafeMode = new UnsafeModeIndicator(); + this._indicators.add_child(this._remoteAccess); this._indicators.add_child(this._thunderbolt); this._indicators.add_child(this._location); this._indicators.add_child(this._unsafeMode); + this._addItems(this._remoteAccess.quickSettingsItems); this._addItems(this._thunderbolt.quickSettingsItems); this._addItems(this._location.quickSettingsItems); this._addItems(this._unsafeMode.quickSettingsItems); diff --git a/js/ui/status/remoteAccess.js b/js/ui/status/remoteAccess.js index 08436d7d1..43435ba48 100644 --- a/js/ui/status/remoteAccess.js +++ b/js/ui/status/remoteAccess.js @@ -5,12 +5,13 @@ const { Atk, Clutter, GLib, GObject, Meta, St } = imports.gi; const Main = imports.ui.main; const PanelMenu = imports.ui.panelMenu; +const {SystemIndicator} = imports.ui.quickSettings; // Minimum amount of time the shared indicator is visible (in micro seconds) const MIN_SHARED_INDICATOR_VISIBLE_TIME_US = 5 * GLib.TIME_SPAN_SECOND; var RemoteAccessApplet = GObject.registerClass( -class RemoteAccessApplet extends PanelMenu.SystemIndicator { +class RemoteAccessApplet extends SystemIndicator { _init() { super._init();